<template>
  <view class="container">
    <view class="content">
      <!-- Auction card -->
      <view class="card blue-card" @tap="goBidding">
        <image class="bg-image" src="/static/jingpai/back1.jpg" mode="aspectFill"></image>
        <view class="card-content">
          <view class="card-text">
            <view class="card-title">竞价拍卖</view>
            <view class="card-subtitle">个人闲置物品、技能服务拍卖</view>
          </view>
          <view class="card-icon">
            <image src="/static/jingpai/1.png" mode="aspectFit" style="width: 80rpx; height: 80rpx;"></image>
          </view>
        </view>
      </view>

      <!-- Fixed price card -->
      <view class="card green-card" @tap="goOne">
        <image class="bg-image" src="/static/jingpai/back2.jpg" mode="aspectFill"></image>
        <view class="card-content">
          <view class="card-text">
            <view class="card-title">一口价</view>
            <view class="card-subtitle">创建商品并在个人店铺中出售</view>
          </view>
          <view class="card-icon">
            <image src="/static/jingpai/2.png" mode="aspectFit" style="width: 80rpx; height: 80rpx;"></image>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      
    }
  },
  methods: {
    goBidding() {
      uni.navigateTo({
        url: '/pages/shop/bidding'
      })
    },
    goOne() {
      uni.navigateTo({
        url: '/pages/shop/one'
      })
    }
  },
  onLoad() {
    console.log('竞拍页面加载')
  },
  onShow() {
    console.log('竞拍页面显示')
  }
}
</script>

<style>
.container {
  width: 100%;
  min-height: 100vh;
  background-color: #f5f7fa;
  padding: 20rpx;
  box-sizing: border-box;
}

.content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 30rpx;
  padding: 20rpx;
  box-sizing: border-box;
}

.card {
  width: 100%;
  border-radius: 24rpx;
  padding: 40rpx;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
}

.card .bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.2;
  z-index: 1;
}

.card:active {
  transform: scale(0.98);
  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.2;
  z-index: 1;
  background-size: cover;
  background-position: center;
  transition: all 0.3s ease;
}

.card:hover::before {
  opacity: 0.25;
}

.card-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.card-text {
  flex: 1;
  margin-right: 30rpx;
}

.card-title {
  font-size: 36rpx;
  font-weight: 600;
  margin-bottom: 12rpx;
  color: #2c3e50;
  white-space: nowrap;
  letter-spacing: 1rpx;
}

.card-subtitle {
  font-size: 28rpx;
  color: #666;
  white-space: nowrap;
  opacity: 0.9;
}

.blue-card {
  background: linear-gradient(135deg, #f8f2ff 0%, #e6d9ff 100%);
}

.green-card {
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
}

.card-icon {
  width: 80rpx;
  height: 80rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  padding: 16rpx;
  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.card-icon image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card:hover .card-icon {
  transform: scale(1.05);
  box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.15);
}
</style>